How to… Add reCAPTCHA to Your Forms

Stop-Spam 2020Spam can be a major problem for any type of form. Luckily, with Gravity Forms, you can add reCAPTCHA to all your forms, helping to cut down the amount of spam you receive.

In this ‘How to...' article, we discuss what exactly Google reCAPTCHA is, provide step-by-step instructions on how to add reCAPTCHA to any of your forms, and share advice on other anti-spam options. Let’s get started…

Note:‌‌ ‌The‌ ‌images‌ ‌shown‌ ‌within‌ ‌this‌ ‌article‌ ‌use‌ ‌the‌ ‌new‌ ‌Gravity‌ ‌Forms‌ ‌2.5‌ ‌form‌ ‌builder.‌ ‌2.5‌ ‌is‌ currently‌ ‌in‌ ‌beta,‌ ‌but‌ ‌if‌ ‌you‌ ‌like‌ ‌what‌ ‌you‌ ‌see,‌ ‌‌check‌ ‌out‌ ‌this‌ ‌article‌‌ ‌for‌ ‌more‌ ‌information‌ ‌on‌ ‌2.5‌ ‌and‌ ‌how‌ ‌to‌ ‌install‌ ‌2.5-beta-1.‌ ‌ ‌

Google reCAPTCHA: An Introduction

Spam form entries can be a source of great annoyance, especially if high in number. To try and combat spam and bot abuse, Gravity Forms supports Google reCAPTCHA v2.

Google reCAPTCHA is a free security service that protects your website from fraud and abuse. By adding reCAPTCHA to your forms, you can block automated software from submitting form entries, while still ensuring a user-friendly experience for human users.

Gravity Forms integrates with two reCAPTCHA v2 options - Checkbox and Invisible reCAPTCHA…

Checkbox reCAPTCHA

reCAPTCHA

Checkbox reCAPTCHA requires a user to click a checkbox to indicate that they are not a robot.

Invisible reCAPTCHA

Invisable reCAPTCHA

Invisible reCAPTCHA simply displays a badge on your form and does not require every user to complete a CAPTCHA test - a test is only displayed if Google suspects suspicious traffic.

Check out this Google reCAPTCHA guide for more information on these two reCAPTCHA options to help you pick the right one for your forms.

Note: Gravity Forms does not currently support Google reCAPTCHA v3. To find out more about this, or to vote for this feature if it is important to you, check out the Gravity Forms Roadmap.

How to Add reCAPTCHA to a Form

Contact Form

Adding reCAPTCHA to a form is a quick and easy process, although the first time you do it you will need to sign up for a free Google account and integrate it with your website. Let’s take a look at this process…

To get started, open the form editor and create your form. At the bottom of your form, add the CAPTCHA field, which you can find under Advanced Fields. As you can see below, the CAPTCHA field will instruct you to sign up with Google for an API key pair for your site. To do this, click on the link Sign Up.

Form Editor CAPTCHA Field

Google will now ask you to register your site. Make sure you select Google reCAPTCHA v2 and then here you can see we have chosen ‘I’m not a Robot’ Tickbox.

Google reCAPTCHA Rgeister

Google will now provide you with a Site Key and a Secret Key.

Google Keys Pairing Sync

Switch back over to your WordPress dashboard and click on Forms > Settings from the left-hand side menu. Then select reCAPTCHA and, under reCAPTCHA Settings, paste in both the keys.

reCAPTCHA Settings Syncing

Complete the other settings on the page and then select Save Settings.

Now switch back to your form - click Update to save what you have already created and to refresh the page. You will now see your CAPTCHA field is displaying a reCAPTCHA v2 tickbox.

reCAPTCHA CAPTCHA

For more information on Gravity Forms and reCAPTCHA, check out our docs.

What Else Can You Do to Protect Forms from Spam Entries?

Aside from adding reCAPTCHA to your forms, there are a number of other strategies that we recommend you implement. These include…

  • Enable Anti-Spam Honeypot - Gravity Forms has a built-in Honeypot feature. Simply select Form Settings and scroll down to Form Options where you can enable Anti-Spam Honeypot.

Anti-Spam Honeypot Enabled

  • Use Conditional Logic to Display the Submit Button - Within Form Settings, under Form Button, you can create and enable conditional logic. This feature allows you to add rules that dynamically display or hide the submit button, depending on a user’s interaction with your form. (Note: To use conditional logic you will need to create a drop down, checkbox, or multiple choice field in the form).

Conditional Logic

For further reading on how to protect your site against spam form entries, check out these articles…

Final Thoughts on How to Add reCAPTCHA to Your Forms

Evidently there is much you can do to prevent spam form entries, although it is important to bear in mind that nothing is full proof. Adding a reCAPTCHA field to each form you create is a sensible and often successful way to manage spam, as well as being a very quick and easy strategy to implement - are you ready to try it out?

Not a Gravity Forms customer yet? Sign up for our free demo to check out our many features (including the CAPTCHA field) and form templates as well as create your own forms. 

 

Gravity Forms Newsletter

If you want to keep up-to-date with what's happening on the blog sign up for the Gravity Forms newsletter!

Share This
One Response to "How to… Add reCAPTCHA to Your Forms"
  1. raju says:

    i love Gravity Forms Newsletter

Leave a Reply